package org.rockyang.shardingjdbc.base.exception;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@NoArgsConstructor
@Data
public class BizException extends RuntimeException {

    /**
     * 错误码
     */
    private String errorCode;

    /**
     * 错误信息
     */
    private String errorMsg;

    public BizException(String message) {
        this.errorMsg = message;
    }

    @Override
    public String getMessage() {
        return this.errorMsg;
    }
}
